#!/bin/sh
#  prepare.sh --- Time-stamp: <2009-02-02 00:59:46 root>
#  Copyright 2008 Julian Qian
#  Author: root@localhost.localdomain
#  Version: $Id: prepare.sh,v 0.0 2008/10/06 04:58:11 root Exp $
#  Keywords: 

# set -x

# SHM_DEV=/dev/shm/ehome

# if [ ! -f $SHM_DEV ];
# then
# 	touch $SHM_DEV
# 	echo "Create SHM device."
# fi

# SYSLOG_CONF=/etc/syslog.conf
# EHOME_LOG=`grep -c local0 $SYSLOG_CONF`
# if [ $EHOME_LOG -eq 0 ];
# then
# 	echo "# ehomed log file" >> $SYSLOG_CONF
# 	echo "local0.*					/var/log/ehomed.log" >> $SYSLOG_CONF
# 	echo "Update $SYSLOG_CONF."
# fi

CONF_DIR=/etc/ehome
CONF_FILE=$CONF_DIR/ehomed.conf
CONF_LOG_FILE=$CONF_DIR/log.properties
if [ ! -d $CONF_DIR ];
then
    mkdir $CONF_DIR
fi
# if [ ! -f $CONF_FILE ];
# then
	cp ehomed.conf $CONF_FILE
# fi
# if [ ! -f $CONF_LOG_FILE ];
# then
    cp log.properties $CONF_LOG_FILE
# fi
echo "Config files are moved."

chmod +s fhomed